package main

import (
	"exe2lua/core"
	"flag"
	"fmt"
	"time"
)

func main() {
	defer check(time.Now())()

	// -config=xx.yaml
	var configFile string
	//打开文件
	flag.StringVar(&configFile, "config", "", "")
	flag.Parse()

	fmt.Println("加载配置文件:", configFile)

	var config core.Config
	config.Init(configFile)
	core.StartProc(&config)

}
func check(old time.Time) func() {
	return func() {
		fmt.Println(time.Since(old).Nanoseconds() / 1000000)
	}
}
